<include file="public:top"/>
<div class="container">
    <div class="maincontent">
        <h3 class="pull-left">
            <i class="glyphicon glyphicon-home"></i>
            用户分组<small>User group</small>
        </h3>
        <if condition="session('u_type') egt commonModel::$isClassType">
            <div class="pull-right addButton">
                <a href="<?php echo Url::createGroup()?>">添加分组</a>
            </div>
        </if>
        <div class="clear"></div>
        <div class='hr'></div>
        <div class="row-space">
            <table class="table table-bordered table-hover">
                <tr>
                    <th>ID</th>
                    <th>组名</th>
                    <th>备注</th>
                    <th>操作</th>
                </tr>
                <foreach name="mGroup" item="vo" key="key">
                    <tr>
                        <td style='width:10%;'>{{$vo.id}}</td>
                        <td style='width:25%;'>{{$vo.name}}</td>
                        <td style='width:40%;'>{{$vo.mark}}</td>
                        <td style='width:25%;'>
                        <a href='<?php echo Url::createGroup($vo['id'])?>' class='btn btn-default' title='修改'>修改</a>&nbsp;&nbsp;
                            <a href='<?php echo Url::groupRule($vo['id'])?>' class='btn btn-default' title='查看权限'>权限</a>&nbsp;&nbsp;
                            <?php if(empty($vo['is_lock'])) {?>
                            <a href='<?php echo Url::lockGroup($vo['id']); ?>' class='btn btn-danger' title="锁定">锁定</a>
                            <?php } else { ?>
                            <a href='<?php echo Url::lockGroup($vo['id']); ?>' id='clickGroup' class='btn alert-success' title="恢复">恢复</a>
                            <?php } ?>
                        </td>
                    </tr>
                </foreach>
            </table>
            <div class="hr"></div>
            <div>{{$showPage}}</div>
        </div>
    </div>
</div>
<include file="public:footer"/>
